home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
M-More Monthly Disks
/
(c)mc.d64
/
gun reloadcost.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
5KB
|
169 lines
100 REM ROBERT MAAS *I LIKE * RT 1 BOX 50 * WOMAN
110 REM SLEEPY EYE,MN * GUNS * ------CAN PROGRAM CARTRIDGES * C-64 *
120 REM
130 C1$="":C2$="[151]":C3$=""
140 TB$=""
150 DIMA$(11):DIMA(11):POKE53280,2:POKE53281,1
160 C1$="":C2$="[151]":C3$=""
170 Z$=C1$+"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
180 N(1)=1:N(2)=20:N(3)=25:N(4)=50:N(5)=100:M(0)=100:M(1)=250:M(2)=1000:A9=2
190 DATA64,,8,255,255,255,255,255,255,3,255,255,,5,192,,3,192,,,192,,,224,,,112,,
200 DATA120,,,169,32,160,11,153,12,5,153,52,5,153,172,5,153,212,5,153,76,6,153,116
210 DATA6,153,236,6,153,20,7,153,140,7,153,180,7,136,208,223,96
220 V=53248:POKE2040,13:POKEV+21,1:POKEV+39,9:POKEV,238:POKEV+16,0
230 POKEV+21,1:POKEV+29,1
240 S$(0)="1":S$(1)="1 1/8":S$(2)="1 1/4":S$(3)="1 3/8":S$(4)="1 1/2":S(0)=40000
250 S$(5)="1 5/8":S$(6)="1 3/4":S$(7)="1 7/8":S(1)=35555:S(2)=32000:S(3)=29090
260 S(4)=26666:S(5)=24615:S(6)=22857:S(7)=21333
270 FORF=0TO31:READX:POKE832+F,X:POKE863+F,0:NEXT
280 FORF=50828TO50865:READX:POKEF,X:NEXT
290 A$(0)=" * SHOTGUN METALIC *":A(0)=1
300 A$(1)=" SALES TAX 6%":A(1)=6
310 A$(2)=" 100 BULLETS $ 8.95":A(2)=895
320 A$(3)=" 100 PRIMERS $ 1.25":A(3)=125
330 A$(4)=" LABOR PER 100":NN=5:A(4)=100
340 A$(5)=" COST LABOR $ 1.00":A(5)=100
350 A$(6)=" POWDER IN GRS 20.1 ":A(6)=201
360 A$(7)=" POWDER--POUND $ 11.11":A(7)=1111
370 A$(8)=" OZ SHOT USED 1.5":A(8)=S(A8)
380 A$(9)=" 25 LBS. SHOT $ 12.00":A(9)=1200
390 A$(10)=" WADS IN UNIT 1000":A(10)=1000
400 A$(11)=" WAD UNIT COST $ 16.99":A(11)=1699
410 GOSUB1590
420 PRINT"[147]"C1$;:FORF=1TO24:PRINTTAB(26)"[221]":NEXT:PRINT""
430 FORF=0TO11:PRINTC2$;A$(F):A=A+1:IFF=11THENPRINTZ$"[157][189]":GOTO460
440 IFA=2THENPRINTZ$:A=0
450 IFA=1THENPRINT
460 NEXT
470 PRINT""TAB(31)C3$"RELOADING[146][157][157][157][157][157][157][157][157][157][223] COSTS [146][169][157][157][157][157][157][157][157][157][223] PER [146][169]"
480 PRINTTAB(33)"[223] [146][169][157][157][157][157][223] [146][169]"
490 PRINTTAB(34)" 1 [157][157][157] 20[157][157][157] 25[157][157][157] 50[157][157][157]100"
500 PRINT""Z$:PRINT""Z$
510 PRINT"[144]":GOSUB1530:GOTO570
520 QQ=Q
530 Q=PEEK(203):IFQ=64AND(QQ=5ORQQ=6)THEN1530
540 IFQ<>4ANDQ<>5ANDQ<>6ANDQ<>3THEN530
550 IFQ=5ORQ=6THENRETURN
560 GOTO1530
570 C1=11:C2=15:IFA(0)=1THENC1=15:C2=11
580 FORF=55340TO55346:POKEF,C1:POKEF+11,C2:NEXT
590 FORF=55497TO55521:POKEF,C2:POKEF+480,C1:POKEF+560,C1:POKEF+640,C1
600 POKEF+720,C1:NEXT
610 POKEV+1,60
620 GOSUB520:IFQ=3THEN680
630 IFQ=5ORQ=6THENA(0)=A(0)+1:IFA(0)>1THENA(0)=0
640 IFA(0)=0ANDQ=4THEN1460
650 IFA(0)=1ANDQ=4THEN1130
660 IFQ=5ORQ=6THEN570
670 GOTO620
680 POKEV+1,75:GOSUB520:IFQ=4THEN610
690 IFQ=6THENA(1)=A(1)-1
700 IFQ=5THENA(1)=A(1)+1
710 IFQ=3ANDA(0)=1THEN750
720 IFQ=3ANDA(0)=0THEN830
730 IFA(1)>9ORA(1)<0THENA(1)=0
740 POKE1167,A(1)+48:GOTO680
750 POKEV+1,91
760 GOSUB520:IFQ=4THEN680
770 IFQ=5THENA(2)=A(2)+1
780 IFQ=6THENA(2)=A(2)-1
790 IFQ=3THEN830
800 IFA(2)=1THENA(2)=500
810 IFA(2)>2000ORA(2)<500THENA(2)=0
820 PRINT""SPC(220)" [157][157][157][157][157][157]"A(2)/100:GOTO760
830 POKEV+1,107
840 GOSUB520:IFQ=3THEN920
850 IFQ=4ANDA(0)=1THEN750
860 IFQ=4ANDA(0)=0THEN680
870 IFQ=5THENA(3)=A(3)+1
880 IFQ=6THENA(3)=A(3)-1
890 IFA(3)=1THENA(3)=75
900 IFA(3)>300ORA(3)<75THENA(3)=0
910 PRINT""TAB(20)" .00[157][157][157][157][157]"A(3)/100:GOTO840
920 POKEV+1,123
930 GOSUB520:IFQ=3THEN990
940 IFQ=4THEN830
950 IFQ=5THENNN=NN+1
960 IFQ=6THENNN=NN-1
970 IFNN>5ORNN<1THENNN=1
980 A(4)=N(NN):PRINT"";TAB(14);" [157][157][157][157]"N(NN):GOTO920
990 POKEV+1,139
1000 GOSUB520:IFQ=3THEN1060
1010 IFQ=5THENA(5)=A(5)+1
1020 IFQ=6THENA(5)=A(5)-1
1030 IFA(5)>999ORA(5)<0THENA(5)=0
1040 IFQ=4THEN920
1050 PRINT""TAB(20)" .0 [157][157][157][157][157]"A(5)/100:GOTO1000
1060 POKEV+1,155
1070 GOSUB520:IFQ=3THEN1130
1080 IFQ=5THENA(6)=A(6)+1
1090 IFQ=6THENA(6)=A(6)-1
1100 IFA(6)>999ORA(6)<1THENA(6)=1
1110 IFQ=4THEN990
1120 PRINT""TAB(14)" [157][157][157][157][157]"A(6)/10:GOTO1070
1130 POKEV+1,171
1140 GOSUB520:IFQ=3ANDA(0)=0THEN1220
1150 IFQ=3ANDA(0)=1THEN610
1160 IFQ=4THEN1060
1170 IFQ=5THENA(7)=A(7)+1
1180 IFQ=6THENA(7)=A(7)-1
1190 IFA(7)=1THENA(7)=600
1200 IFA(7)>2000ORA(7)<600THENA(7)=.
1210 PRINT""TAB(20)" [157][157][157][157][157][157]"A(7)/100:GOTO1140
1220 POKEV+1,187
1230 GOSUB520:IFQ=3THEN1300
1240 IFQ=4THEN1130
1250 IFQ=5THENA8=A8+1
1260 IFQ=6THENA8=A8-1
1270 IFA8>7ORA8<0THENA8=0
1280 A(8)=S(A8)
1290 PRINT""TAB(14)" [157][157][157][157][157][157]"S$(A8):GOTO1230
1300 POKEV+1,203
1310 GOSUB520:IFQ=3THEN1380
1320 IFQ=4THEN1220
1330 IFQ=5THENA(9)=A(9)+1
1340 IFQ=6THENA(9)=A(9)-1
1350 IFA(9)=1THENA(9)=1000
1360 IFA(9)>2000ORA(9)<1000THENA(9)=0
1370 PRINT""TAB(20)" [157][157][157][157][157][157]"A(9)/100:GOTO1310
1380 POKEV+1,219
1390 GOSUB520:IFQ=3THEN1460
1400 IFQ=4THEN1300
1410 IFQ=5THENA9=A9+1
1420 IFQ=6THENA9=A9-1
1430 IFA9>2ORA9<0THENA9=0
1440 A(10)=M(A9)
1450 PRINT""TAB(14)" [157][157][157][157][157][157]"A(10):GOTO1380
1460 POKEV+1,235
1470 GOSUB520:IFQ=3THEN610
1480 IFQ=4THEN1380
1490 IFQ=5THENA(11)=A(11)+1
1500 IFQ=6THENA(11)=A(11)-1
1510 IFA(11)>2500ORA(11)<0THENA(11)=0
1520 PRINT""TAB(20)" [157][157][157][157][157][157]"A(11)/100:GOTO1470
1530 SYS50828:T=0:IFA(0)=1THENT=T+(A(2)/100):GOTO1550
1540 T=T+((A(9)/A(8))*100)+(A(11)/A(10))
1550 T=T+(A(3)/100)+((A(7)/7000*A(6))/10):T=T+(T*A(1)/100):TL=T+A(5)/A(4)
1560 PRINT"":GOSUB1570:PRINT"":T=TL:GOSUB1570:RETURN
1570 PRINTTB$""INT(T+.5)/100:PRINTTB$""INT((T*20)+.5)/100"[157]":PRINTTB$INT((T*25)+.5)/100"[157][157]"
1580 PRINTTB$INT((T*50)+.5)/100"[157][157][157]":PRINTTB$INT((T*100)+.5)/100"":RETURN
1590 ZX$=" "
1600 PRINT"[147]"ZX$:PRINT" RELOADING COSTS "
1610 PRINT" BY BOB MAAS ":PRINTZX$
1620 PRINT"[154]USE THE FUNCTION KEYS TO ENTER YOUR DATA"
1630 PRINT" [155] F2 [146][144] TO MOVE UP A CATAGORY"
1640 PRINT" [155] F3 [146][144] TO RAISE VALUE OF CATAGORY"
1650 PRINT" [155] F5 [146][144] TO LOWER VALUE OF CATAGORY"
1660 PRINT" [155] F7 [146][144] TO MOVE DOWN A CATAGORY"
1670 PRINT" TWO TOTAL COSTS ARE GIVEN"
1680 PRINT" TOP VALUE IS YOUR COST"
1690 PRINT" BOTTOM INCLUDES LABOR"
1700 PRINT" PUSH A KEY TO BEGIN [144]"
1710 IFPEEK(197)=64THEN1710
1720 RETURN
1730 REM--------------------------------
1740 REM ROBERT MAAS
1750 REM RT 1 BOX 50
1760 REM SLEEPY EYE,MN
1770 REM 56085 USA